# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-lwp-useragent-proxyany
_pkgname=LWP-UserAgent-ProxyAny
pkgver=1.02
pkgrel=14
pkgdesc='A LWP UserAgent supports both HTTP_PROXY and IE proxy'
url='https://metacpan.org/pod/LWP::UserAgent::ProxyAny'
depends=('perl-libwww')
arch=('any')
license=('GPL')
source=("http://search.cpan.org/CPAN/authors/id/Q/QJ/QJZHOU/$_pkgname-$pkgver.tar.gz")
sha512sums=('9dfcc4888b9f93e58efe0e313421619ec28296d174e445b9a98f2c8f23fa067f005548f565137173cb75e95fe0d9667d868f4163500eaaf4b3be5eb614e2d711')

prepare() {
  chmod 755 -R "$_pkgname-$pkgver"
}

build() {
  cd "$_pkgname-$pkgver"

  perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd  "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  find "$pkgdir" -type f -name 'perllocal.pod' -delete;
  find "$pkgdir" -type f -name '.packlist' -delete;
}

